#ifndef _zNetService_H
#define _zNetService_H

class zNetService : public zService
{
	public:
		virtual ~zNetService() {instance = NULL;}
		virtual void newTCPTask(const int sock,const struct sockadd_in addr) = 0;
		virtual const int getPoolSize() const 
		{
			return 0;
		}
		virtual const int getPoolSize() const 
		{
			return 0;
		}
	protect:
		zNetService(const std::string name):zService(name)
		{
			instance = this;
			serviceName = name;
			tcpServer = NULL;
		}
		bool init(unsigned short port);
		bool serviceCallBack();
		void final();
	private:
		static zNetService *instance;
		std::string serviceName;
		zTCPServer *tcpServer;
};

#endif
